/*
  学习目标：掌握泛型接口的使用
  作用: 描述大量相似的数据结构
  语法: interface  IXxx<T> {}
*/

interface IResponse<T> {
  success: boolean;
  message: string;
  code: number;
  data: T;
}

const userListData: IResponse<{ rows: string[]; total: number }> = {
  success: true,
  message: '成功',
  code: 200,
  data: {
    rows: ['1'],
    total: 100,
  },
};

const roleListData: IResponse<{ list: string[] }> = {
  success: true,
  message: '成功',
  code: 200,
  data: [] as any,
};
